<template>
  <router-view v-slot="{ Component, route }">
    <keep-alive :include="$store.state.keepAliveList">
      <component :key="route.meta.title || $route.path" :is="Component" />
    </keep-alive>
  </router-view>
</template>

<script setup>
import { computed } from "vue";
import useUtils from "@/utils";
const { $common, $router, $store, $global } = useUtils();

//设置rem
(function (doc, win) {
  var docEl = doc.documentElement,
    resizeEvt = "orientationchange" in window ? "orientationchange" : "resize",
    recalc = function () {
      var clientWidth = docEl.clientWidth;
      if (!clientWidth) {
        return false;
      }
      // 750 是按照PSD设计稿以iphone6、7、8来设定的！
      docEl.style.fontSize = clientWidth / 375 + "px";
    };
  if (!doc.addEventListener) {
    return false;
  }

  win.addEventListener(resizeEvt, recalc, false);
  doc.addEventListener("DOMContentLoaded", recalc, false);
})(document, window);
</script>
<style lang="scss">
@import url("@/styles/common.scss");

@font-face {
  font-family: "MyCustomFont";
  src: url("@/assets/font/ABeeZee-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}
</style>
